import request from '@/utils/request'
// 获取更新列表
export const getUpdateItems = data => {
    return request({
        method: 'POST',
        url: '/articles/home',
        data
    })
}
// 获取文章内容
export const getArticleContent = data => {
    return request({
        method: 'POST',
        url: '/articles/showArticle/',
        data,
        headers: {
            'Content-Type': 'application/json'
        },
    })
}
// 新建发表文章
export const publishArticle = data => {
    return request({
        method: 'POST',
        url: '/articles/publish',
        data,
        headers: {
            'Content-Type': 'application/json'
        },
    })
}
// 展示我的博客列表
export const getMyItem = data => {
    return request({
        method: 'POST',
        url: '/articles/myBlogs',
        data,
        headers: {
            'Content-Type': 'multipart/form-data'
        },
    })
}
// 上传文章封面
export const updateCover = data => {
    return request({
        method: 'POST',
        url: '/articles/updateCover',
        data,
        headers: {
            'Content-Type': 'multipart/form-data'
        },
    })
}